<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	template="/WEB-INF/templates/template.xhtml">
	<ui:define name="content">
		<h:messages globalOnly="true" />
		<h:form id="form">
			<h:outputText value="Selected : #{pageBean.selected.name}" id="msg" />
			<br />

			<h:selectOneMenu value="#{pageBean.selected}" id="selector"
				converter="convert.teacher">
				<f:selectItems value="#{teachers}" id="items" var="v_teacher"
					itemLabel="#{v_teacher.name}" />
				<f:ajax render="msg" execute="@this" />
			</h:selectOneMenu>


			<h:commandButton value="Update" action="update" />
			<h:message for="selector" styleClass="errorMsg" />
		</h:form>
	</ui:define>
</ui:composition>


